package cn.udrm.elasticsearch.fulltext;

import java.io.File;
import java.util.List;

public class DirectoryRecurse implements Runnable {

    private BuildFileIndex buildFileIndex;

    private final File file;

    private List totalList=null;

    private String indexName;

    private String docType;

    public DirectoryRecurse(BuildFileIndex buildFileIndex,File file,List totalList,String indexName,String docType) {
        this.buildFileIndex=buildFileIndex;
        this.file = file;
        this.totalList=totalList;
        this.indexName=indexName;
        this.docType=docType;
    }

    @Override
    public void run() {
        buildFileIndex.createIndex(file,indexName,docType);
        totalList.add(0);
    }
}
